package com.changgou.goods.dao;

import com.changgou.goods.pojo.Para;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface ParaMapper extends Mapper<Para> {

    /**
     * 根据分类名称查询参数
     */
    @Select("SELECT name,options FROM tb_para WHERE template_id IN(SELECT template_id FROM tb_category WHERE NAME = #{categoryName})")
    List<Map> findParamListByCategoryName(@Param("categoryName") String categoryName);
}
